package com.work.demo.entity;

import lombok.*;

/**
 * @ProjectName: demo
 * @Package: com.example.demo.entity
 * @ClassName: Book
 * @Author: Deng YuBin
 * @Description:
 * @Date: 2021/2/18 17:15
 * @Version: 1.0
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class Book {

	private String name;
	private String author;

//    @Override
//	public int hashCode() {
//		int result = 17;
//		result = 37 * result + name.hashCode();
//		result = 37 * result + author.hashCode();
//		return result;
//
//	}

//	@Override
//	public boolean equals(Object obj) {
//		return obj instanceof Book && name == (((Book) obj).name) && author == (((Book) obj).author);
//	}

	protected Book initBook() {
		Book book = new Book();
		book.setAuthor("测试父类");
		book.setName("测试子类");
		return book;
	}


}
